3.1.99 \(\int \frac {(a+b x)^2 (A+B x)}{x^4} \, dx\) [99]

Optimal. Leaf size=49 \[ -\frac {a^2 A}{3 x^3}-\frac {a (2 A b+a B)}{2 x^2}-\frac {b (A b+2 a B)}{x}+b^2 B \log (x) \]

[Out]

-1/3*a^2*A/x^3-1/2*a*(2*A*b+B*a)/x^2-b*(A*b+2*B*a)/x+b^2*B*ln(x)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {77} \begin {gather*} -\frac {a^2 A}{3 x^3}-\frac {a (a B+2 A b)}{2 x^2}-\frac {b (2 a B+A b)}{x}+b^2 B \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((a + b*x)^2*(A + B*x))/x^4,x]

[Out]

-1/3*(a^2*A)/x^3 - (a*(2*A*b + a*B))/(2*x^2) - (b*(A*b + 2*a*B))/x + b^2*B*Log[x]

Rule 77

Int[((d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_))*((e_) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*
x)*(d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, d, e, f, n}, x] && IGtQ[p, 0] && (NeQ[n, -1] || EqQ[p, 1]) && N
eQ[b*e + a*f, 0] && ( !IntegerQ[n] || LtQ[9*p + 5*n, 0] || GeQ[n + p + 1, 0] || (GeQ[n + p + 2, 0] && Rational
Q[a, b, d, e, f])) && (NeQ[n + p + 3, 0] || EqQ[p, 1])

Rubi steps

\begin {align*} \int \frac {(a+b x)^2 (A+B x)}{x^4} \, dx &=\int \left (\frac {a^2 A}{x^4}+\frac {a (2 A b+a B)}{x^3}+\frac {b (A b+2 a B)}{x^2}+\frac {b^2 B}{x}\right ) \, dx\\ &=-\frac {a^2 A}{3 x^3}-\frac {a (2 A b+a B)}{2 x^2}-\frac {b (A b+2 a B)}{x}+b^2 B \log (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 48, normalized size = 0.98 \begin {gather*} -\frac {6 A b^2 x^2+6 a b x (A+2 B x)+a^2 (2 A+3 B x)}{6 x^3}+b^2 B \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((a + b*x)^2*(A + B*x))/x^4,x]

[Out]

-1/6*(6*A*b^2*x^2 + 6*a*b*x*(A + 2*B*x) + a^2*(2*A + 3*B*x))/x^3 + b^2*B*Log[x]

________________________________________________________________________________________

Maple [A]
time = 0.07, size = 46, normalized size = 0.94

method result size
default \(-\frac {a^{2} A}{3 x^{3}}-\frac {a \left (2 A b +B a \right )}{2 x^{2}}-\frac {b \left (A b +2 B a \right )}{x}+b^{2} B \ln \left (x \right )\) \(46\)
norman \(\frac {\left (-a b A -\frac {1}{2} a^{2} B \right ) x +\left (-b^{2} A -2 a b B \right ) x^{2}-\frac {a^{2} A}{3}}{x^{3}}+b^{2} B \ln \left (x \right )\) \(50\)
risch \(\frac {\left (-a b A -\frac {1}{2} a^{2} B \right ) x +\left (-b^{2} A -2 a b B \right ) x^{2}-\frac {a^{2} A}{3}}{x^{3}}+b^{2} B \ln \left (x \right )\) \(50\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x+a)^2*(B*x+A)/x^4,x,method=_RETURNVERBOSE)

[Out]

-1/3*a^2*A/x^3-1/2*a*(2*A*b+B*a)/x^2-b*(A*b+2*B*a)/x+b^2*B*ln(x)

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 50, normalized size = 1.02 \begin {gather*} B b^{2} \log \left (x\right ) - \frac {2 \, A a^{2} + 6 \, {\left (2 \, B a b + A b^{2}\right )} x^{2} + 3 \, {\left (B a^{2} + 2 \, A a b\right )} x}{6 \, x^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^2*(B*x+A)/x^4,x, algorithm="maxima")

[Out]

B*b^2*log(x) - 1/6*(2*A*a^2 + 6*(2*B*a*b + A*b^2)*x^2 + 3*(B*a^2 + 2*A*a*b)*x)/x^3

________________________________________________________________________________________

Fricas [A]
time = 1.21, size = 53, normalized size = 1.08 \begin {gather*} \frac {6 \, B b^{2} x^{3} \log \left (x\right ) - 2 \, A a^{2} - 6 \, {\left (2 \, B a b + A b^{2}\right )} x^{2} - 3 \, {\left (B a^{2} + 2 \, A a b\right )} x}{6 \, x^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^2*(B*x+A)/x^4,x, algorithm="fricas")

[Out]

1/6*(6*B*b^2*x^3*log(x) - 2*A*a^2 - 6*(2*B*a*b + A*b^2)*x^2 - 3*(B*a^2 + 2*A*a*b)*x)/x^3

________________________________________________________________________________________

Sympy [A]
time = 0.29, size = 54, normalized size = 1.10 \begin {gather*} B b^{2} \log {\left (x \right )} + \frac {- 2 A a^{2} + x^{2} \left (- 6 A b^{2} - 12 B a b\right ) + x \left (- 6 A a b - 3 B a^{2}\right )}{6 x^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)**2*(B*x+A)/x**4,x)

[Out]

B*b**2*log(x) + (-2*A*a**2 + x**2*(-6*A*b**2 - 12*B*a*b) + x*(-6*A*a*b - 3*B*a**2))/(6*x**3)

________________________________________________________________________________________

Giac [A]
time = 2.03, size = 51, normalized size = 1.04 \begin {gather*} B b^{2} \log \left ({\left | x \right |}\right ) - \frac {2 \, A a^{2} + 6 \, {\left (2 \, B a b + A b^{2}\right )} x^{2} + 3 \, {\left (B a^{2} + 2 \, A a b\right )} x}{6 \, x^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^2*(B*x+A)/x^4,x, algorithm="giac")

[Out]

B*b^2*log(abs(x)) - 1/6*(2*A*a^2 + 6*(2*B*a*b + A*b^2)*x^2 + 3*(B*a^2 + 2*A*a*b)*x)/x^3

________________________________________________________________________________________

Mupad [B]
time = 0.32, size = 48, normalized size = 0.98 \begin {gather*} B\,b^2\,\ln \left (x\right )-\frac {x^2\,\left (A\,b^2+2\,B\,a\,b\right )+\frac {A\,a^2}{3}+x\,\left (\frac {B\,a^2}{2}+A\,b\,a\right )}{x^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((A + B*x)*(a + b*x)^2)/x^4,x)

[Out]

B*b^2*log(x) - (x^2*(A*b^2 + 2*B*a*b) + (A*a^2)/3 + x*((B*a^2)/2 + A*a*b))/x^3

________________________________________________________________________________________